<?php

namespace app\shopapi\validate;

use think\Validate;

class ShopGoods extends Validate
{

    protected $rule = [
        'goods_category_id' => 'require',
        'profile' => 'require',
        'goods_name' => 'require',
        'sku' => 'require',
        'price' => 'require',
        'commission_rate' => 'require',
        'end_sell_time'=>'require',
    ];

    protected $message = [
        'goods_category_id.require' => '请选择套餐类型',
        'profile.require' => '请填写套餐项目',
        'goods_name.require' => '请填写套餐名称',
        'sku.require' => '请填加商品sku',
        'price.require' => '请填写团购价',
        'commission_rate.require' => '请填写佣金率',
        'end_sell_time.require' => '请选择结束售卖时间',
    ];

    protected $scene = [
        'add'  => ['goods_category_id','profile','goods_name','sku','price','commission_rate']
    ];
}